<template>

</template>

<script>
    import {onMounted} from 'vue'
    import {getDataTest, getTest, postTest} from "../network/task";

    export default {
        name: "CrossDomain",
        setup() {
            async function testGet() {

                return await getTest()
            }

            async function testPost() {

                return await postTest()
            }

            async function testGetData(){
                return await getDataTest()
            }

            onMounted(() => {
                console.log("挂载完成");
                // console.log(testGet());
                testGet().then(response => {
                        console.log(response);
                    }
                )

                testPost().then(response => {
                        console.log(response);
                    }
                )

                console.log(testGetData());

            })
        }
    }
</script>

<style scoped>

</style>
